﻿Public Class Review
    Public mintProjectID As Integer
    Public mintUserID As Integer

    Private Sub Review_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim ldtReview As DataTable
        Dim lclsReview As CrystalDataHub.BLL.Review
        Try
            ldtReview = New DataTable
            lclsReview = New CrystalDataHub.BLL.Review
            ldtReview = lclsReview.GetReview(mintUserID, mintProjectID)
            grdData.DataSource = ldtReview
        Catch ex As Exception
            Me.FormulateAndLogError(ex, "Review", mintProjectID)
        Finally
            ldtReview = Nothing
            lclsReview = Nothing
        End Try
    End Sub

    Private Sub grdData_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles grdData.InitializeLayout
        If grdData.DisplayLayout.Bands(0).Columns.Exists("Name") Then
            grdData.DisplayLayout.Bands(0).Columns("Name").Header.Appearance.BackColor = Color.Red
        End If
    End Sub

    ''' <summary>
    ''' 
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub grdData_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles grdData.InitializeRow
        If e.Row.GetCellValue("InvStatusCode") = Crystal.CLL.EntityStatus.DELTE Or _
            e.Row.GetCellValue("InvStatusCode") = Crystal.CLL.EntityStatus.EXTNT Then
            e.Row.Cells("Name").Appearance.ForeColor = Color.Red
        End If
    End Sub

    Private Sub btnOk_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOk.Click
        Me.Close()
    End Sub
End Class